package cn.java68;

import cn.java68.basic.Hello;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        //手工组装对象
//        Hello h=new Hello();
//        h.setPerson("李金哲");
//        h.setWords("越南小媳妇就是好");
//        h.say();
        ApplicationContext ac=new ClassPathXmlApplicationContext("applicationContext.xml");
        Hello h=ac.getBean("h",Hello.class);
        h.say();
        Hello h2=(Hello)ac.getBean("h");
        System.out.println(h==h2);//?
    }
}
